package core;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Geometry {
    public ArrayList<Integer> indices;
    public ArrayList<Float> vertices;
    public ArrayList<Float> uv;

    public Geometry(){
        List list = Arrays.asList(
                0.5f, 0.5f, 0.5f,  -0.5f, 0.5f, 0.5f,  -0.5f,-0.5f, 0.5f,   0.5f,-0.5f, 0.5f,  // v0-v1-v2-v3 front
                0.5f, 0.5f, 0.5f,   0.5f,-0.5f, 0.5f,   0.5f,-0.5f,-0.5f,   0.5f, 0.5f,-0.5f,  // v0-v3-v4-v5 right
                0.5f, 0.5f, 0.5f,   0.5f, 0.5f,-0.5f,  -0.5f, 0.5f,-0.5f,  -0.5f, 0.5f, 0.5f,  // v0-v5-v6-v1 up
                -0.5f, 0.5f, 0.5f,  -0.5f, 0.5f,-0.5f,  -0.5f,-0.5f,-0.5f,  -0.5f,-0.5f, 0.5f,  // v1-v6-v7-v2 left
                -0.5f,-0.5f,-0.5f,   0.5f,-0.5f,-0.5f,   0.5f,-0.5f, 0.5f,  -0.5f,-0.5f, 0.5f,  // v7-v4-v3-v2 down
                0.5f,-0.5f,-0.5f,  -0.5f,-0.5f,-0.5f,  -0.5f, 0.5f,-0.5f,   0.5f, 0.5f,-0.5f   // v4-v7-v6-v5 back
        );
        this.vertices = new ArrayList<Float>();
        this.vertices.addAll(list);

        List list2 = Arrays.asList(
                1f,1f, 0f,1f, 0f,0f, 1f,0f,  // v0-v1-v2-v3 front
                0f,1f, 0f,0f, 1f,0f, 1f,1f,  // v0-v3-v4-v5 right
                1f,0f, 1f,1f, 0f,1f, 0f,0f,  // v0-v5-v6-v1 up
                1f,1f, 0f,1f, 0f,0f, 1f,0f,  // v1-v6-v7-v2 left
                0f,1f, 1f,1f, 1f,0f, 0f,0f,  // v7-v4-v3-v2 down
                1f,0f, 0f,0f, 0f,1f, 1f,1f   // v4-v7-v6-v5 back
        );
        this.uv = new ArrayList<Float>();
        this.uv.addAll(list2);

        List list3 = Arrays.asList(
                0, 1, 2,   0, 2, 3,    // front
                4, 5, 6,   4, 6, 7,    // right
                8, 9,10,   8,10,11,    // up
                12,13,14,  12,14,15,    // left
                16,17,18,  16,18,19,    // down
                20,21,22,  20,22,23     // back
        );
        this.indices = new ArrayList<Integer>();
        this.indices.addAll(list3);

    }
}
